<?xml version="1.0" encoding="UTF-8"?>
<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Transitional//EN" "http://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd">
<html xmlns="http://www.w3.org/1999/xhtml"
	xmlns:ui="http://java.sun.com/jsf/facelets"
	xmlns:h="http://java.sun.com/jsf/html"
	xmlns:f="http://java.sun.com/jsf/core"
	xmlns:a4j="http://richfaces.org/a4j"
	xmlns:rich="http://richfaces.ajax4jsf.org/rich" xml:lang="en">
<head>
<title>课件管理</title>
<meta http-equiv="keywords" content="enter,your,keywords,here" />
<meta http-equiv="description"
	content="A short description of this page." />
<link
	href="#{facesContext.externalContext.requestContextPath}/css/public.css"
	rel="stylesheet" type="text/css" media="screen" />
<link
	href="#{facesContext.externalContext.requestContextPath}/css/main.css"
	rel="stylesheet" type="text/css" media="screen" />
<link
	href="#{facesContext.externalContext.requestContextPath}/css/work.css"
	rel="stylesheet" type="text/css" media="screen" />
<meta http-equiv="content-type" content="text/html; charset=UTF-8" />
<!-- rich:message style-->
<style type="text/css">
	.rich-message-label{
		color:red;
	}
</style>
</head>
<body style="background-color: #ffffff">
<h:form>
	<div id="right">
	<div id="msgid" class="error pt10p bcf c0 tal" style="display: ">
	<a4j:outputPanel id="msgPanel">
		<center><h:outputText styleClass="cff"
			value="#{CoursewareBB.msg}" /></center>
	</a4j:outputPanel></div>
	<div class="tablelist">
	<table width="100%" border="1" cellpadding="0" cellspacing="0"
		bordercolor="#c3c3c3" style="border-collapse: collapse">
		<tr>
			<td>OFFICE<h:selectOneMenu
				class="style_input" value="#{CoursewareBB.office_code}">
				<f:selectItem />
				<f:selectItems value="#{otherParamBB.selectItems_officeInfId}" />
			</h:selectOneMenu></td>
			<td>技能组<h:selectOneMenu
				class="style_input" value="#{CoursewareBB.tp_userkind}">
				<f:selectItem />
				<f:selectItems value="#{paramBB.selectItems_param}" />
			</h:selectOneMenu></td>
		</tr>
		<tr>
			<td>课件标题<h:inputText
				class="style_input" value="#{CoursewareBB.keyWord}" /></td>
			<td>课件状态 <h:selectOneMenu
				class="style_input" value="#{CoursewareBB.tp_state}">
				<f:selectItem />
				<f:selectItems value="#{paramBB.selectItem['tp_courseware_state']}" />
			</h:selectOneMenu></td>
			<td><h:commandButton class="buttonbg" value="查询"
				action="#{CoursewareBB.queryCoursewares}"
				reRender="coursewaretable,msgPanel,cutpage" /></td>
		</tr>
	</table>
	</div>
	<div class="tablelist2"><rich:dataTable rowClasses=",yellow"
		width="100%" id="coursewaretable" value="#{CoursewareBB.coursewares}"
		var="table">
		<a4j:keepAlive beanName="CoursewareBB" />
		<f:facet name="header">
			<rich:columnGroup>
				<rich:column>
					<h:outputText value="选择" />
				</rich:column>
				<rich:column>
					<h:outputText value="office" />
				</rich:column>
				<rich:column>
					<h:outputText value="课件标题" />
				</rich:column>
				<rich:column>
					<h:outputText value="技能组" />
				</rich:column>
				<rich:column>
					<h:outputText value="课件状态" />
				</rich:column>
				<rich:column>
					<h:outputText value="操作人" />
				</rich:column>
				<rich:column>
					<h:outputText value="操作时间" />
				</rich:column>
				<rich:column>
					<h:outputText value="是否有附件" />
				</rich:column>
			</rich:columnGroup>
		</f:facet>
		<rich:columnGroup>
			<rich:column>
				<h:selectBooleanCheckbox value="#{table.select}" />
			</rich:column>
			<rich:column>
				<h:outputText value="#{table.office_code_value}" />
			</rich:column>
			<rich:column>
				<h:outputText value="#{table.tp_cwtitle}" />
			</rich:column>
			<rich:column>
				<h:outputText value="#{table.tp_userkind_value}" />
			</rich:column>
			<rich:column>
				<h:outputText value="#{table.tp_state_value}" />
			</rich:column>
			<rich:column>
				<h:outputText value="#{table.tp_op}" />
			</rich:column>
			<rich:column>
				<h:outputText value="#{table.tp_op_date}" >
					<f:convertDateTime pattern="yyyy-MM-dd" />
				</h:outputText>
			</rich:column>
			<rich:column>
				<h:inputHidden value="#{table.tp_affixaddress}" />
				<h:inputHidden value="#{table.tp_filename}" />
				<h:outputText value="没有附件！" rendered="#{empty(table.tp_filename)}"/>
				<h:commandLink style="color:blue" value="#{table.tp_filename}" actionListener="#{CoursewareBB.downloadAction}" target="_blank"/>
			</rich:column>
		</rich:columnGroup>
	</rich:dataTable></div>
	<div class="table_grey"><a4j:outputPanel id="cutpage">
		<table cellpadding="0" cellspacing="0" border="0" height="13"
			width="99%">
			<tr>
				<td width="20%" align="center" valign="middle"
					style="padding-top: 5px; font-size: 12px">总共<strong class="by"><h:outputLabel style="margin-right:5px"
					value="#{CoursewareBB.counttotal}"></h:outputLabel> </strong>条记录</td>
				<td width="40%" align="center" valign="bottom"
					style="font-size: 12px"><a4j:commandButton value="去首页" style="margin-right:30px"
					action="#{CoursewareBB.cutPage}" image="/images/main/a1.gif"
					reRender="coursewaretable,cutpage">
					<f:param name="index" value="1"></f:param>
				</a4j:commandButton> <a4j:commandButton value="去上页" action="#{CoursewareBB.cutPage}" style="margin-right:30px"
					image="/images/main/a2.gif" reRender="coursewaretable,cutpage">
					<f:param name="index" value="#{CoursewareBB.index-1}"></f:param>
				</a4j:commandButton> <a4j:commandButton value="去下页" action="#{CoursewareBB.cutPage}" style="margin-right:30px"
					image="/images/main/a3.gif" reRender="coursewaretable,cutpage">
					<f:param name="index" value="#{CoursewareBB.index+1}"></f:param>
				</a4j:commandButton> <a4j:commandButton value="去末页" action="#{CoursewareBB.cutPage}" style="margin-right:30px"
					image="/images/main/a4.gif" reRender="coursewaretable,cutpage">
					<f:param name="index" value="#{CoursewareBB.pagetotal}"></f:param>
				</a4j:commandButton></td>
				<td width="30%" align="left" valign="bottom" style="font-size: 12px">
				<span>第:</span><span class="by"><strong> <h:outputLabel
					value="#{CoursewareBB.index}"></h:outputLabel> </strong> </span>/<h:outputLabel style="margin-right:10px"
					value="#{CoursewareBB.pagetotal}">页</h:outputLabel> 10条/页 <h:selectOneMenu style="margin-left:20px"
					value="#{CoursewareBB.index}">
					<f:selectItems value="#{CoursewareBB.pages}" />
					<a4j:support event="onchange" action="#{CoursewareBB.cutPage}"
						reRender="coursewaretable,cutpage"></a4j:support>
				</h:selectOneMenu></td>
			</tr>
		</table>
	</a4j:outputPanel></div>
	<div class="listbut"><h:commandButton styleClass="buttonbg"
		value="添加" action="#{CoursewareBB.toAddCourseware}" /> <h:commandButton
		styleClass="buttonbg" value="修改"
		action="#{CoursewareBB.toUpdateCourseware}" /><h:commandButton
		styleClass="buttonbg" value="刪除"
		action="#{CoursewareBB.deleteCourseware}" /> <h:commandButton
		styleClass="buttonbg" value="查看"
		action="#{CoursewareBB.toDisplyCourseware}" /></div>
	</div>
</h:form>
<!-- 
<script language="javascript">
	function()
</script>
 -->
</body>
</html>

